<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../styles/register.css" />
<title>用户注册</title>
<script type="text/javascript">
	function checkPass() {
		var pwd1 = document.getElementById("password1").value;
		var pwd2 = document.getElementById("password2").value;
		if (pwd1 != pwd2) {
			document.getElementById("errorpwd").style.display = "block";
			return false;
		}
	};
</script>
</head>

<body>
	<form action="./register_skip.php" target="_parent" method="post"
		enctype="multipart/form-data">
		<div>
			<h1>用户注册</h1>
			<h2>用户信息</h2>
			<div class="table_style">
				<label> 您的账号： </label> <input type="text" name="user_account"> </input>
			</div>
			<div class="table_style">
				<label> 您的密码： </label> <input type="password" id="password1"
					name="user_password"> </input>
			</div>
			<div class="table_style">
				<label> 重新输入： </label> <input type="password" id="password2"
					onblur="return checkPass();"> </input><span id="errorpwd"
					style="display: none;">两次输入密码不一致</span>
			</div>
			<div class="table_style">
				<label> 您的姓名： </label> <input type="text" name="user_name"> </input>
			</div>
			<div class="table_style">
				<label> 您的照片： </label> <img id="user_img"
					src=<?php
					if (! empty ( $_GET ['user_img'] ) && ($_GET ['user_img'] != "-1") && ($_GET ['user_img'] != "-2")) {
						$user_img_path = $_GET ['user_img'];
						echo $user_img_path;
					} else {
						$user_img_path = "../styles/images/tu_mr.jpg";
						echo $user_img_path;
					}
					?>> </img>
					<?php
					if (! empty ( $_GET ['user_img'] ) && ($_GET ['user_img'] == "-1") || ($_GET ['user_img'] == "-2")) {
						if ($_GET ['user_img'] == "-1") {
							echo "图片已存在";
						} else if ($_GET ['user_img'] == "-2") {
							echo "无效文件";
						}
					}
					?>
					<input type="hidden" name="user_image_path"
					value=<?php echo "$user_img_path"?> />
			</div>
			<div class="table_style_file">
				<input type="file" name="user_image" /> <input class="button"
					name="user_image_button" type="submit" value="上传" />
			</div>
			<h2>安全信息</h2>
			<div class="table_style">
				<label> 是否开启： </label> <input class="redio_style" type="radio"
					name="is_secure" checked="checked" value="yes"> </input>是<input
					class="redio_style" type="radio" name="is_secure" value="no"> </input>否
			</div>
			<div class="table_style">
				<label> 安全问题： </label> <select class="select_style"
					name="user_question" id="select">
					<option value="1" selected="selected">请选择···</option>
					<option value="2">你最喜欢的人</option>
					<option value="3">你最好的朋友</option>
				</select> </input>
			</div>
			<div class="table_style">
				<label> 回答问题： </label> <input type="text" name="user_answer"> </input>
			</div>
			<div class="button_style">
				<input class="button" name="user_submit" type="submit" value="立即注册" />
				<input class="button" type="reset" value="重新填写" /> <a class="a_css"
					href="../login.php">返回登录</a>
			</div>
		</div>
	</form>
</body>
</html>
